zap_low_mappings(); /* Do the same for the idle page tables. */
/* Give up the VGA console if DOM0 is configured to grab it. */
- console_endboot(strstr(cmdline, "tty0") != NULL);
+ console_endboot(cmdline && strstr(cmdline, "tty0"));
/* DOM0 gets access to everything. */
physdev_init_dom0(p);
{
unsigned char *opt_end, *opt;
while ( *cmdline == ' ' ) cmdline++;
- cmdline = strchr(cmdline, ' ');
+ cmdline = strchr(cmdline, ' '); /* skip the image name */
while ( cmdline != NULL )
{
while ( *cmdline == ' ' ) cmdline++;
shadow_mode_init();
+ /* Grab the DOM0 command line. Skip past the image name. */
+ cmdline = (unsigned char *)(mod[0].string ? __va(mod[0].string) : NULL);
+ if ( cmdline != NULL )
+ {
+ while ( *cmdline == ' ' ) cmdline++;
+ if ( (cmdline = strchr(cmdline, ' ')) != NULL )
+ while ( *cmdline == ' ' ) cmdline++;
+ }
+
/*
* We're going to setup domain0 using the module(s) that we stashed safely
* above our heap. The second module, if present, is an initrd ramdisk.
(mod[1].mod_start-mod[0].mod_start),
(mbi->mods_count == 1) ? 0 :
mod[mbi->mods_count-1].mod_end - mod[1].mod_start,
- __va(mod[0].string)) != 0)
+ cmdline) != 0)
panic("Could not set up DOM0 guest OS\n");
/* The stash space for the initial kernel image can now be freed up. */